package day05;

import java.util.Deque;
import java.util.LinkedList;

import org.junit.Test;

/**
 * 创建一个栈，存入Integer类型元素1,2,3,4,5
 * 然后遍历队列并输出每个元素
 * @author Bonnie
 *
 */
public class Test02 {
	@Test
	public void test() {
		Deque<Integer> a = new LinkedList<Integer>();
		for (int i = 1; i < 6; i++) {
			a.push(i);
		}
		for (int i = 0; i < 5; i++) {
			System.out.println(a.pop());
		}
		
	}
}
